package ${element.packagePath!}.${element.servicePackageName!}.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import ${element.packagePath!}.${element.beanPackageName!}.${element.beanName!}Entity;
import ${element.packagePath!}.${element.mapperPackageName!}.${element.beanName!}Mapper;
import ${element.packagePath!}.${element.servicePackageName!}.${element.beanName!}Service;

import javax.annotation.Resource;

/**
*<p>
*   ${element.notesTable!} 服务实现类
*</p>
*
* @author ${element.author!}
* @since ${element.date!}
*/
@Service
public class ${element.beanName!}ServiceImpl extends ServiceImpl<${element.beanName!}Mapper, ${element.beanName!}Entity> implements ${element.beanName!}Service {

    @Resource
    ${element.beanName!}Mapper ${element.beanCaseName!}Mapper;

    @Override
    public Page<${element.beanName!}Entity> query${element.beanName!}Page(Page page, ${element.beanName!}Entity ${element.beanCaseName!}) {
        return ${element.beanCaseName!}Mapper.${element.beanCaseName!}QueryPage(page,${element.beanCaseName!});
    }

    @Override
    public ${element.beanName!}Entity get${element.beanName!}ById(String id){
        return ${element.beanCaseName!}Mapper.get${element.beanName!}ById(id);
    }

    @Override
    public void save${element.beanName!}(${element.beanName!}Entity ${element.beanCaseName!}){
         this.save(${element.beanCaseName!});
    }

    @Override
    public void update${element.beanName!}(${element.beanName!}Entity ${element.beanCaseName!}){
         this.updateById(${element.beanCaseName!});
    }

    @Override
    public void delete${element.beanName!}(String id){
        this.removeById(id);
    }


}
